package demo.messaging.common;

import java.util.List;
import java.util.Map;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("srv.IMessageService")
public interface IMessageService extends RemoteService {

	public List<? extends AbstractMessage> getMessages()
			throws ServiceException;

	public Map<String, EnumUserStatus> listUsers() throws ServiceException;

	public void login(final String userName) throws ServiceException;

	public void logout(final String userName) throws ServiceException;

	public void sendMessage(final AbstractMessage message)
			throws ServiceException;

	public void updateUserStatus(final EnumUserStatus status)
			throws ServiceException;

}
